🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / core / repository / src / commonMain / kotlin / org / meshtastic / core / repository / RadioInterfaceService.kt
Displaying Raw • Download
core/repository/src/commonMain/kotlin/org/meshtastic/core/repository/RadioInterfaceService.kt f07624be882e679affc02931dc75e8cb1594de18 (f07624be) Text, 2.87 KB
T8b949e/*
* Copyright (c) 2025-2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.repository
Tff7b72import T7ee787kotlinx.coroutines.CoroutineScope
Tff7b72import T7ee787kotlinx.coroutines.flow.SharedFlow
Tff7b72import T7ee787kotlinx.coroutines.flow.StateFlow
Tff7b72import T7ee787org.meshtastic.core.model.ConnectionState
Tff7b72import T7ee787org.meshtastic.core.model.DeviceType
Tff7b72import T7ee787org.meshtastic.core.model.InterfaceId
Tff7b72import T7ee787org.meshtastic.core.model.MeshActivity
T8b949e/** Interface for the low-level radio interface that handles raw byte communication. */
Tff7b72interface T56d364RadioInterfaceService Tb4b4b4{
T8b949e/** The device types supported by this platform's radio interface. */
Tff7b72val Te6edf3supportedDeviceTypesTb4b4b4: Te6edf3ListTff7b72<Te6edf3DeviceTypeTff7b72>
T8b949e/** Reactive connection state of the radio. */
Tff7b72val Te6edf3connectionStateTb4b4b4: Te6edf3StateFlowTff7b72<Te6edf3ConnectionStateTff7b72>
T8b949e/** Flow of the current device address. */
Tff7b72val Te6edf3currentDeviceAddressFlowTb4b4b4: Te6edf3StateFlowTff7b72<Tffa657String?Tff7b72>
T8b949e/** Whether we are currently using a mock interface. */
Tff7b72fun Td2a8ffisMockInterfaceTb4b4b4(Tb4b4b4)Tb4b4b4: Tffa657Boolean
T8b949e/** Flow of raw data received from the radio. */
Tff7b72val Te6edf3receivedDataTb4b4b4: Te6edf3SharedFlowTff7b72<Te6edf3ByteArrayTff7b72>
T8b949e/** Flow of radio activity events. */
Tff7b72val Te6edf3meshActivityTb4b4b4: Te6edf3SharedFlowTff7b72<Te6edf3MeshActivityTff7b72>
T8b949e/** Sends a raw byte array to the radio. */
Tff7b72fun Td2a8ffsendToRadioTb4b4b4(Te6edf3bytesTb4b4b4: Te6edf3ByteArrayTb4b4b4)
T8b949e/** Initiates the connection to the radio. */
Tff7b72fun Td2a8ffconnectTb4b4b4(Tb4b4b4)
T8b949e/** Returns the current device address. */
Tff7b72fun Td2a8ffgetDeviceAddressTb4b4b4(Tb4b4b4)Tb4b4b4: Tffa657String?
T8b949e/** Sets the device address to connect to. */
Tff7b72fun Td2a8ffsetDeviceAddressTb4b4b4(Te6edf3deviceAddrTb4b4b4: Tffa657String?Tb4b4b4)Tb4b4b4: Tffa657Boolean
T8b949e/** Constructs a full radio address for the specific interface type. */
Tff7b72fun Td2a8fftoInterfaceAddressTb4b4b4(Te6edf3interfaceIdTb4b4b4: Te6edf3InterfaceIdTb4b4b4, Te6edf3restTb4b4b4: Tffa657StringTb4b4b4)Tb4b4b4: Tffa657String
T8b949e/** Called by an interface when it has successfully connected. */
Tff7b72fun Td2a8ffonConnectTb4b4b4(Tb4b4b4)
T8b949e/** Called by an interface when it has disconnected. */
Tff7b72fun Td2a8ffonDisconnectTb4b4b4(Te6edf3isPermanentTb4b4b4: Tffa657BooleanTb4b4b4, Te6edf3errorMessageTb4b4b4: Tffa657String? Tff7b72= Tff7b72nullTb4b4b4)
T8b949e/** Called by an interface when it has received raw data from the radio. */
Tff7b72fun Td2a8ffhandleFromRadioTb4b4b4(Te6edf3bytesTb4b4b4: Te6edf3ByteArrayTb4b4b4)
T8b949e/** Flow of user-facing connection error messages (e.g. permission failures). */
Tff7b72val Te6edf3connectionErrorTb4b4b4: Te6edf3SharedFlowTff7b72<Tffa657StringTff7b72>
T8b949e/** The scope in which interface-related coroutines should run. */
Tff7b72val Te6edf3serviceScopeTb4b4b4: Te6edf3CoroutineScope
Tb4b4b4}
Served by rngit 1.5.2 - Generated in 0.07s